#include <iostream>
#include "studenti.h"
using std::cin;
using std::cout;
using std::endl;

const int n_stu = 3;
const int n_class = 5;

void set(Student & stu, int n);

int main(int argc, char const *argv[])
{
    freopen("input.txt", "r", stdin);

    Student stus[n_stu] =
    {Student(n_class), Student(n_class), Student(n_class)};

    int i;
    for (int i = 0; i < n_stu; i++)
    {
        set(stus[i], n_class);
    }
    
    for (int i = 0; i < n_stu; i++)
    {
        cout << stus[i].Name() << " ";
    }
    cout << endl;

    for (int i = 0; i < n_stu; i++)
    {
        cout << endl << stus[i].Name();
        cout << endl << stus[i];
        cout << "AVG: " << stus[i].Average() << endl;
    }
    
    
    return 0;
}

void set(Student & stu, int n)
{
    getline(cin, stu);
    for (int i = 0; i < n; i++)
    {
        cin >> stu[i];
    }
    while (cin.get() != '\n') continue;
}